﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FotoStammbuch.Core
{
    public class MdiChildExtender
    {
        private Form _form; 

        public MdiChildExtender(Form form, Form parentForm)
        {
            _form = form;

            _form.MdiParent = parentForm;
            _form.FormClosing += FormClosing;
        }

        private void FormClosing(object sender, FormClosingEventArgs e)
        {
            _form.Visible = false;
            e.Cancel = true;
        }
    }
}
